package ar.com.personalTravellers.generators.runner;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import ar.com.personalTravellers.generators.ConfigurationParameterDataGenerator;
import ar.com.personalTravellers.generators.CountryFileDataGenerator;
import ar.com.personalTravellers.generators.HotelContactsFileDataGenerator;
import ar.com.personalTravellers.generators.HotelDescriptionInternationalizableDataGenerator;
import ar.com.personalTravellers.generators.HotelFileDataGenerator;
import ar.com.personalTravellers.generators.HotelRoomsFileDataGenerator;
import ar.com.personalTravellers.generators.LanguageDataGenerator;
import ar.com.personalTravellers.generators.NeighborhoodFileDataGenerator;
import ar.com.personalTravellers.generators.RoleDataGenerator;
import ar.com.personalTravellers.generators.RoomFileDataGenerator;
import ar.com.personalTravellers.generators.UserDataGenerator;

import com.angel.data.generator.base.DataGeneratorRunner;
import com.angel.data.generator.builders.DataGeneratorRunnerBuilder;
import com.angel.data.generator.builders.impl.DataGeneratorRunnerImplBuilder;

/**
 * @author William
 */
public class PTDataGeneratorRunnerDAO extends HibernateDaoSupport{

    public PTDataGeneratorRunnerDAO(){
        super();
    }

    public void initializeDataInformation(){
        //PTDAOFactory ptDAOFactory = (PTDAOFactory) ApplicationContextSpring.createInstance().prepareApplicationContext().getBean("ptDAOFactory");
        DataGeneratorRunnerBuilder builder = new DataGeneratorRunnerImplBuilder();
        builder.addDataGeneratorClass(RoleDataGenerator.class);
        builder.addDataGeneratorClass(NeighborhoodFileDataGenerator.class);
        builder.addDataGeneratorClass(RoomFileDataGenerator.class);
        builder.addDataGeneratorClass(ConfigurationParameterDataGenerator.class);
        builder.addDataGeneratorClass(LanguageDataGenerator.class);
        builder.addDataGeneratorClass(HotelFileDataGenerator.class);
        builder.addDataGeneratorClass(HotelRoomsFileDataGenerator.class);
        builder.addDataGeneratorClass(CountryFileDataGenerator.class);
        builder.addDataGeneratorClass(HotelDescriptionInternationalizableDataGenerator.class);
        builder.addDataGeneratorClass(HotelContactsFileDataGenerator.class);
        builder.addDataGeneratorClass(UserDataGenerator.class);
        
        DataGeneratorRunner runner = builder.buildDataGeneratorRunner();

        runner.generateData();
    }
}